-- GENERATED SPELL FOR [Rampaging Ghoul] --


function spell0_32178(pUnit, Event) --@Pierce Armor,n/a--
pUnit:FullCastSpellOnTarget(6016,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_32178', 20000, 1)
end

function spell1_32178(pUnit, Event) --@Rampage,Self--
pUnit:FullCastSpellOnTarget(54475,pUnit)
pUnit:RegisterEvent('Sorts_32178', 6000, 1)
end

function Sorts_32178(pUnit, Event)
local choix_sorts_32178 = math.random(0, 1)
if choix_sorts_32178 == 0 then
pUnit:RegisterEvent('spell0_32178', 1, 1)
end
if choix_sorts_32178 == 1 then
pUnit:RegisterEvent('spell1_32178', 1, 1)
end
end

function mob32178_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_32178', math.random(1500, 3000), 1)
end

function mob32178_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32178_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob32178_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(32178, 1, 'mob32178_Action')
RegisterUnitEvent(32178, 2, 'mob32178_Leave')
RegisterUnitEvent(32178, 3, 'mob32178_Kill')
RegisterUnitEvent(32178, 4, 'mob32178_Die')
